<template>
	<view class="">
		<Header title="AI错题解析" :isHome="true" :isWhite='true'></Header>
		<view class="main">
			<!-- <view class="title">
				自动发送题目：
			</view> -->
			<view class="">
				<span style="font-weight: 600;">题目：</span>{{title}}
			</view>
			<!-- <view class="">
				请回答答案并解说/解析题目
			</view> -->
			<view class="title">
				鲸鲸回复：
			</view>
			<view class="t-content" style=" white-space: pre-line;">
				{{answer}}
			</view>
			<!-- <view class="">
				这句诗不完全正确。正确的诗句应该是:“床前明月光，疑是地上霜。举头望明月，低头思故乡。”这首诗出自唐代诗人李白的《静夜思》
			</view>
			<view class="titleinfo">
				下面是对这首诗的简要解析:
			</view>
			<view class="analyze">
				<span class="title">1、床前明月光:</span>
				<span>描述了诗人在夜晚看到明亮的月光照在床前的情景。</span>
			</view>
			<view class="analyze">
				<span class="title">2、疑是地上霜:</span>
				<span>由于月光非常明亮，诗人一开始误以为地上的白光是霜。</span>
			</view>
			<view class="analyze">
				<span class="title">3、举头望明月:</span>
				<span>诗人抬头看向天空中的明月。</span>
			</view>
			<view class="analyze">
				<span class="title">4、低头思故乡:</span>
				<span>在看到明月后，诗人低下头心中涌起了对远方故乡的思念之情。</span>
			</view>
			<view class="">
				这首诗通过简洁的语言表达了诗人在异乡夜晚的孤独和对家乡的深切思念，是中国古典诗歌中的经典之作。
			</view> -->
		</view>
		<view class="bottom-text">
			解析也有不准确的时候，请以参考答案为准，如有疑问，请咨询学习顾问
		</view>
	</view>
</template>

<script>
	import {
		get
	} from '../../utils/request';
	export default {
		data() {
			return {
				title:'',
				questionId: '',
				as_id: '',
				answer: ''
			}
		},
		methods: {

		},
		onLoad(options) {
			console.log(options);
			this.title = decodeURIComponent(options.title);
			this.questionId = options.questionId
			this.as_id = options.as_id
			this.getWrongSend()
		},
		methods: {
			getWrongSend() {
				get('/ai/wrong_send?type=1&questionId=' + this.questionId + '&as_id=' + this.as_id).then(res => {
						if (res.code == 1) {
							this.answer = res.data
						} else {
							uni.showToast({
								title: res.msg
							})
						}
					})
					.catch(err => {
						console.error('GET 请求失败:', err);
					});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.t-content{
		min-height: 54vh;
	}
	.bottom-text {
		padding-bottom: 80rpx;
		position: relative;
		// position: fixed;
		// bottom: 80rpx;
		width: 100%;
		text-align: center;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 20rpx;
		color: #878787;
	}

	.main {
		padding: 30rpx;
		font-family: PingFangSC-SNaNrpxibold;
		overflow-y: scroll;

		.title {
			margin: 40rpx 0;
			font-weight: 600;
		}

		view {
			margin: 10rpx 0;
		}

		.titleinfo {
			margin: 30rpx 0;
		}

		.analyze {
			margin: 20rpx 0;

			.title {
				font-weight: 600;
				margin-right: 20rpx;
			}
		}
	}
</style>